package test2.greedy;

import java.util.Collections;
import java.util.HashMap;
import java.util.Stack;
import java.util.TreeMap;

public class Solution3 {

    public String reorganizeString(String S) {
        // 在此处写入代码
        HashMap<Character, Integer> map = new HashMap<>();
        Stack<Character> stack = new Stack<>();

        for (char c : S.toCharArray()) {
            if (map.get(c)  == null){
                map.put(c, 1);
            } else {
                map.put(c, map.get(c) + 1);
            }
        }
        return "";

    }
}
